package com.woniuxy.java106crm.controller;

import com.woniuxy.java106crm.annotation.RequireMethod;
import com.woniuxy.java106crm.request.ResponseResult;
import com.woniuxy.java106crm.service.CustomerContributionService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
@Api(tags = "客户贡献分析API文档")
@RestController
@RequestMapping("/CustomerContributionController")
public class CustomerContributionController {
    @Resource
    private CustomerContributionService customerContributionService;

    /**
     * 查询所有客户的订单总价
     */
    @RequireMethod("查询客户的订单总价")
    @GetMapping("/selectCustomerTotal")
    public ResponseResult selectCustomerTotal(){
        return new ResponseResult<>(ResponseResult.OK, customerContributionService.selectCustomerTotal());
    }
}
